package cn.com.blueInfo.bpm.person.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.person.entity.GroupUser;
import cn.com.blueInfo.bpm.person.request.GroupUserDTO;
import cn.com.blueInfo.bpm.person.response.GroupUserVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 群组固定人员表 对象转换
 * @author suxch
 * @since 2025-08-31 16:18:02
 */
@Mapper(componentModel = "spring")
public interface GroupUserConvert
        extends BaseConvert<GroupUser, GroupUserDTO, GroupUserVO> {

    GroupUser dtoToEntity(GroupUserDTO dto);

    GroupUser dtoToEntity(GroupUserDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    GroupUserVO entityToVO(GroupUser entity);

}